package com.xiyuan.smartutils.template.engine.expression.symbol;

/**
 * 和与号原型(&&)
 * 
 * @version v1.0.0 @author lgz 2020年11月1日 新建与整理
 */
public class _Ampersand extends Symbol
{
    private static final long serialVersionUID = 1L;
    public _Ampersand(String path, int line, int column)
    {
        super(path, line, column);
    }
    
    private int type = SYMBOL_AMPERSAND;
    
    public void setDouble(boolean isDouble)
    {
        this.type = isDouble ? SYMBOL_AMPERSAND_2 : SYMBOL_AMPERSAND;
    }
    
    @Override
    public int getType()
    {
        return type;
    }
    
    @Override
    public String toString()
    {
        return type == SYMBOL_AMPERSAND_2 ? " && " : " & ";
    }
}
